/*
 * Copyright (c) 2015 www.smarthome.com All rights reserved. 本软件源代码版权归----所有,未经许可不得任意复制与传播.
 */
package com.smarthome.base.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.smarthome.base.dao.ShAccountFeatureDao;
import com.smarthome.base.dao.base.BaseDao;
import com.smarthome.base.service.ShAccountFeatureService;
import com.smarthome.base.service.base.BaseServiceImpl;
import com.smarthome.domain.bean.ShAccountFeature;

/**
 * ShAccountFeatureService 实现类
 * @author KongXiangyu
 * @since 2015-09-07
 */
@Service("shAccountFeatureService")
public class ShAccountFeatureServiceImpl extends BaseServiceImpl<ShAccountFeature, Long> implements ShAccountFeatureService {

    @Resource
    private ShAccountFeatureDao shAccountFeatureDao;

    public BaseDao<ShAccountFeature, Long> getDao() {
        return shAccountFeatureDao;
    }

	@Override
	public List<ShAccountFeature> queryAllAccountFeatures() {
		ShAccountFeature accountFeature=new ShAccountFeature();
		accountFeature.setActive(1);
		accountFeature.setOrderField("id");
		accountFeature.setOrderFieldType("DESC");
		return this.selectEntryList(accountFeature);
	}

	@Override
	public List<ShAccountFeature> queryAccountFeaturesByAccountId(Long accountId) {
		return shAccountFeatureDao.queryFeaturesByAccountId(accountId);
	}

}